package edu.qqcui.study.test;


import edu.qqcui.study.config.MainConfigForLifeCycle;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * TODO
 *
 * @author cuiqingqiang
 * @version 1.0
 * @date 2021-06-26 15:20
 **/
public class IOCTestForLifeCycle {

	@Test
	public void testLifeCycle() {
		AnnotationConfigApplicationContext applicationContext = new AnnotationConfigApplicationContext(MainConfigForLifeCycle.class);
		applicationContext.getBean("car");
		applicationContext.getBean("cat");
		applicationContext.close();
	}
}
